"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var u_api_parser_1 = require("./u_api_parser");
var u_template_1 = require("./u_template");
//@ts-ignore
var fs = require('fs');
(function () {
    try {
        var txt = fs.readFileSync('./data/java_api.json', 'utf8');
        var json = JSON.parse(txt);
        var list = u_api_parser_1.utilJavaApiParser.parseSchemas(json, function () {
            return false;
        });
        // console.log('list', list.AddRequestWorkFlow.varList);
        // console.log(JSON.stringify(list, null, 2));
        fs.writeFileSync('./data/class.d.ts', u_template_1.utilTemplate.genInterface(list), 'utf8');
        var httpList = u_api_parser_1.utilJavaApiParser.parsePaths(json);
        fs.writeFileSync('./data/http.d.ts', u_template_1.utilTemplate.genInterface(httpList), 'utf8');
    }
    catch (error) {
        console.log('err', error);
    }
})();
